import request from "../utils/request"

export default{
    //获取全部会员
    getList(){
        return request({
            method:"get",
            url:"/member/list",
        })
    },
    //分页查询
    getListPage(page,rows,searchMap){
        return request({
            method:"post",
            url:`/member/list/search/${page}/${rows}`,
            data:{
                searchMap
            }
        })
    },
    //添加会员
    addMember(member){
        return request({
            method:"post",
            url:`/member/add`,
            data:{
                member,
            }
        })
    },
    //查询某个会员
    getOne(id){
        return request({
            method:"get",
            url:`/member/getOne/${id}`,
        }) 
    },
    //修改会员信息
    EditOne(member){
        return request({
            method:"put",
            url:`/member/updateOne/${member.id}`,
            data:{
                member,
            }
        }) 
    },
    //删除会员信息
    deleteOne(id){
        return request({
            method:"delete",
            url:`/member/delete/${id}`,
        })
    }
}